{% extends 'base.html' %}
{% load staticfiles %}

{% block content %}

<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <h2 class="page-header">修改房间信息</h2>
    <div>
        <form class="form-horizontal" method="POST" action="/room_info/edit?id={{room.id}}">
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">楼层</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" name="floor" value="{{room.floor}}" readonly>
                </div>
            </div>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">房间号</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" name="num" value="{{room.num}}" readonly>
                </div>
            </div>
            <div class="form-group">
                <label for="inputPassword3" class="col-sm-2 control-label">可住人数</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" name="people" value="{{room.people_num}}">
                </div>
            </div>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">房间状态</label>
                <div class="col-sm-5">
                    <select class="form-control" name='status'>
                        <option value="1" {%if room.status == 1%}selected="selected" {%endif%}>空闲</option>
                        <option value="2" {%if room.status == 2%}selected="selected" {%endif%}>预定</option>
                        <option value="3" {%if room.status == 3%}selected="selected" {%endif%}>清理中</option>
                        <option value="4" {%if room.status == 4%}selected="selected" {%endif%}>维修中</option>
                        <option value="5" {%if room.status == 5%}selected="selected" {%endif%}>入住</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="email" class="col-sm-2 control-label">房间类型</label>
                <div class="col-sm-5">
                    <select class="form-control" name='type'>
                        <option value="1" {%if room.type == 1%}selected="selected" {%endif%}>标准间</option>
                        <option value="2" {%if room.type == 2%}selected="selected" {%endif%}>大床房</option>
                        <option value="3" {%if room.type == 3%}selected="selected" {%endif%}>商务双人间</option>
                        <option value="4" {%if room.type == 4%}selected="selected" {%endif%}>豪华大床房</option>
                    </select>
                </div>
                <div class="col-sm-4 tips"></div>
            </div>
            <input type="hidden" name="id" value="{{room.id}}">
            {% csrf_token %}
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-2">
                    <button type="submit" class="btn btn-primary">修改</button>
                </div>
            </div>
        </form>

    </div>
</div>


{% endblock %}